package com.mall.chapter07

import android.content.Intent
import android.os.Bundle
import com.google.android.material.snackbar.Snackbar
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.AppBarConfiguration
import androidx.navigation.ui.navigateUp
import androidx.navigation.ui.setupActionBarWithNavController
import android.view.Menu
import android.view.MenuItem
import android.view.View
import com.mall.chapter07.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() ,View.OnClickListener{

    private lateinit var binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)

        binding.dropDown.setOnClickListener(this)



    }

    override fun onClick(view: View?) {
        when(view?.id){
            R.id.drop_down -> {
                val intent = Intent(this,SpinnerDownActivity::class.java)
                startActivity(intent)
            }
        }
    }


}